<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">广告列表</div>
    <div class="main_soso">
    <form action="/admin/search_channel.shtml">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="19" height="30" align="center"><img src="../images/clean_011.gif" width="16" height="16" /></td>
		    <td>
		       渠道编号：
		      <input name="u.userId" type="text" value="${u.userId}" style="width:80px;" class="inputwidth01" onkeypress="util.justNum();" id="u.userId" maxlength="30" />&nbsp;&nbsp;
		       渠道名称：
		      <input name="u.realName" type="text" value="${u.realName}" style="width:80px;" class="inputwidth01" id="u.realName" maxlength="30" />&nbsp;&nbsp;
		        
		       渠道状态:
		       <select name="u.status">
		      
		          <option value="">请选择...</option>
		          <option value="0"  <c:if test="${u.status=='0'}">selected="selected"</c:if>>禁止</option>
		          <option value="1"  <c:if test="${u.status=='1'}">selected="selected"</c:if>>正常</option>
		       </select> 
		       
		      </td>
		    <td align="left">
		      <input name="input7" type="submit" class="input01" value="搜索" /></td>
		  </tr>
		</table>
    </form>
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="10%">渠道编号</th>
          <th width="8%">登录名</th>
          <th width="10%">渠道名称</th>
          <th width="27%">联系人/电话/其他</th>
          <th width="20%">公司名称</th>
          <th width="10%">状态</th>
          <th width="10%">操作</th>
          <th></th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <c:forEach items="${page_list.list}" var="o">
	      <tr>
	         <td width="10%">${o.userId}</td>
	         <td width="8%">${o.userName}</td>
	         <td width="10%">${o.realName}</td>
	         <td width="27%">${o.contact}/${o.mobile}/${o.phone}</td>
	         <td width="20%">${o.companyName}</td>
	         <td width="10%">
	            <c:choose>
	              <c:when test="${o.status=='0'}"><span style="color:#ff0000;"> 禁止</span></c:when>
	              <c:when test="${o.status=='1'}"><span style="color:blue;">正常 </span></c:when>
	            </c:choose>
	         </td>
	         <td width="10%">
	         <a href="/admin/to_channel.shtml?userId=${o.userId}" >编辑</a>
	            <c:choose>
	              <c:when test="${o.status=='0'}">
	                 <a href="javascript:us(${o.userId},'1');void(0);" >通过</a>
	              </c:when>
	              <c:when test="${o.status=='1'}">
	                  <a href="javascript:us(${o.userId},'0');void(0);" >禁止</a>
	              </c:when>
	            </c:choose>
	         </td>
	         <td >&nbsp;</td>
	      </tr>
      </c:forEach>
    </table>
  </div>
  
  <app:page></app:page>
</div>
</body>
</html>
<script type="text/javascript">
  
     function us(id,s){
    	 if(confirm('确定操作?')){
    		 	window.location='/admin/update_status.shtml?userId='+id+'&status='+s; 
    	 }
     }

</script>